package org.openwebtop.sunshine.user;

import java.util.Date;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.openwebtop.sunshine.domain.User;

public class UserContext {
	private User user;
	private boolean login;
	private Date lastAccessDate;

	public UserContext(User user) {
		this.user = user;
	}

	public UserContext(User user, boolean login) {
		this.user = user;
		this.login = login;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public boolean isLogin() {
		return login;
	}

	public void setLogin(boolean login) {
		this.login = login;
	}

	public Date getLastAccessDate() {
		return lastAccessDate;
	}

	public void setLastAccessDate(Date lastAccessDate) {
		this.lastAccessDate = lastAccessDate;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
